Skip to content

Fix VersionRange crash on not in range versions - #29

Merged
Hritik14 merged 2 commits into
mainfrom
fix/version_range_crash
Jan 14, 2022
Merged

Fix VersionRange crash on not in range versions#29
Hritik14 merged 2 commits into
mainfrom
fix/version_range_crash

Conversation

@Hritik14

@Hritik14 Hritik14 commented Jan 14, 2022

Copy link
Copy Markdown
Collaborator

Earlier, the check for whether the pairwise version constraints is in a
valid sequence and if the given version is in that pairwise range was
performed in a single condition. Upon failing the later case, it assumed
the failure of earlier as well and crashed.
Now, the later check is performed within the former condition.

Also, the check for != before looking for any constraint with a "="
avoids matching "!=" in the later case.

Fixes: #25

Signed-off-by: Hritik Vijay hritikxx8@gmail.com

Earlier, the check for whether the pairwise version constraints is in a
valid sequence and if the given version is in that pairwise range was
performed in a single condition. Upon failing the later case, it assumed
the failure of earlier as well and crashed.
Now, the later check is performed within the former condition.

Also, the check for != before looking for any constraint with a "="
avoids matching "!=" in the later case.

Fixes: #25

Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
@Hritik14
Hritik14 force-pushed the fix/version_range_crash branch from 0ae59a0 to 0bd9162 Compare January 14, 2022 08:56
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
@Hritik14
Hritik14 force-pushed the fix/version_range_crash branch from 9b762c9 to 0d37220 Compare January 14, 2022 13:18
@Hritik14
Hritik14 merged commit 26308b1 into main Jan 14, 2022
@Hritik14
Hritik14 deleted the fix/version_range_crash branch January 14, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Univers decides to explode when truth is violated

1 participant